Dummy menus may emit ::open-state-changed multiple times for
the same state. Avoid doing that so that the PopupMenuManager
is happy not having to handle reentrancy.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5064
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2178>
}
open() {
+ if (this.isOpen)
+ return;
+ this.isOpen = true;
this.emit('open-state-changed', true);
}
close() {
+ if (!this.isOpen)
+ return;
+ this.isOpen = false;
this.emit('open-state-changed', false);
}